package com.example.project.service;

import com.example.project.entity.InventoryTrend;
import com.example.project.entity.TcdmSecureHazardList;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

/**
 * (TcdmSecureHazardList)表服务接口
 *
 * @author makejava
 * @since 2024-02-23 15:18:23
 */
public interface TcdmSecureHazardListService {

    /**
     * 通过ID查询单条数据
     *
     * @param tshlId 主键
     * @return 实例对象
     */
    TcdmSecureHazardList queryById(Integer tshlId);

    /**
     * 查询所有数据
     *
     * @return 所有数据
     */
    List<TcdmSecureHazardList> findList();
    /**
     * 分页查询
     *
     * @param tcdmSecureHazardList 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<TcdmSecureHazardList> queryByPage(TcdmSecureHazardList tcdmSecureHazardList, PageRequest pageRequest, Date star, Date end);

    /**
     * 新增数据
     *
     * @param tcdmSecureHazardList 实例对象
     * @return 实例对象
     */
    TcdmSecureHazardList insert(TcdmSecureHazardList tcdmSecureHazardList);

    /**
     * 修改数据
     *
     * @param tcdmSecureHazardList 实例对象
     * @return 实例对象
     */
    TcdmSecureHazardList update(TcdmSecureHazardList tcdmSecureHazardList);

    /**
     * 通过主键删除数据
     *
     * @param tshlId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer tshlId);

    boolean deleteById1(Integer id);

    boolean deleteByValid();

    InventoryTrend getTrend(TcdmSecureHazardList tcdmSecureHazardList,Date star,Date end) throws ParseException;
}
